package com.cloud.mapper;

import com.cloud.entity.Provider;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author .
 * created in 2020/1/12 17:34
 */

@Repository
public interface ProviderMapper {

    int addProvider(Provider provider);

    int delProvider(@Param("id") int id);

    int delProviders(@Param("ids") List<Integer> ids);

    int updateProvider(Provider provider);

    int getProviderCount(@Param("name") String name);

    List<Provider> findAllByPage(@Param("page") int page, @Param("limit") int limit, @Param("name") String name);

    Provider findById(@Param("id") int id);

    Provider findByName(@Param("name") String name);

}
